.dashboard-container {
  padding: 1rem;
  height: 100%;
  background-color: #f8f9fa;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e9ecef;
}

.dashboard-title {
  font-size: 1.5rem;
  margin: 0;
  font-weight: 500;
  color: #212529;
}

.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.update-time {
  color: #6c757d;
  font-size: 0.9rem;
}

.refresh-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auto-refresh-settings {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: #f1f3f5;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  margin-right: 0.5rem;
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background-color: #fff;
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-right: 1rem;
  flex-shrink: 0;
}

.stat-icon i {
  font-size: 1.5rem;
}

.total-stock .stat-icon {
  background-color: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
}

.total-amount .stat-icon {
  background-color: rgba(32, 201, 151, 0.1);
  color: #20c997;
}

.warehouse-count .stat-icon {
  background-color: rgba(255, 193, 7, 0.1);
  color: #ffc107;
}

.goods-type-count .stat-icon {
  background-color: rgba(108, 117, 125, 0.1);
  color: #6c757d;
}

.stat-content {
  flex-grow: 1;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: #6c757d;
}

.chart-container {
  display: flex;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.chart-box {
  flex: 1;
  background-color: #fff;
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  min-height: 400px; /* 增加最小高度 */
  display: flex;
  flex-direction: column;
}

.chart-box h4 {
  margin-bottom: 1rem;
  color: #495057;
  font-weight: 500;
}

.chart {
  width: 100%;
  height: 350px; /* 固定图表高度 */
  flex-grow: 1;
}

.low-stock-warning {
  background-color: #fff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.low-stock-warning h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #dc3545;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.low-stock-warning h3 i {
  font-size: 1.2rem;
}

.low-stock-items {
  overflow: auto;
}

.more-link {
  text-align: right;
  margin-top: 0.5rem;
}

.more-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
}

.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

@keyframes rotating {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.rotating {
  animation: rotating 1s linear infinite;
}

/* 响应式调整 */
@media (max-width: 992px) {
  .stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .chart-container {
    flex-direction: column;
  }

  .chart-box {
    min-height: 350px;
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  .stats-cards {
    grid-template-columns: 1fr;
  }
  
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .dashboard-actions {
    width: 100%;
    justify-content: space-between;
  }
} 